package personnel.department.dao.entity;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.Table;

@Entity
@Table(name="internship")
public class Internship implements UniqueObject {

	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	@Column(name="id")
	private Long id;

	@OneToOne(cascade=CascadeType.ALL)
	private Diplom diplom;

	@Column(name="internship")
	private Boolean internship;

	@Column(name="traineeship")
	private Boolean traineeship;
	
	@Column(name="speciality")
	private String speciality;

	@Column(name="target_training")
	private Boolean targetTraining;
	
	@ManyToOne(cascade=CascadeType.ALL)
	@JoinColumn(name="employee_Id")
	private Employee employee;

	public Internship() {
	}

	public Long getId() {
		return id;
	}

	public Diplom getDiplom() {
		return diplom;
	}

	public Boolean getInternship() {
		return internship;
	}

	public Boolean getTargetTraining() {
		return targetTraining;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public void setDiplom(Diplom diplom) {
		this.diplom = diplom;
	}

	public void setInternship(Boolean internship) {
		this.internship = internship;
	}

	public void setTargetTraining(Boolean targetTraining) {
		this.targetTraining = targetTraining;
	}

	public String getSpeciality() {
		return speciality;
	}

	public void setSpeciality(String speciality) {
		this.speciality = speciality;
	}

	public Employee getEmployee() {
		return employee;
	}

	public void setEmployee(Employee employee) {
		this.employee = employee;
	}

	public Boolean getTraineeship() {
		return traineeship;
	}

	public void setTraineeship(Boolean traineeship) {
		this.traineeship = traineeship;
	}

}
